﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MesGLApp.DAL.MesDB
{
    [Serializable]
    [Table("prod_schedule")]
    public class ProdSchedule
    {
        /// <summary>
        /// ID，主键，自增长
        /// </summary>
        [Column("id"), Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }

        /// <summary>
        /// 生产线ID
        /// </summary>
        [Column("line_id")]
        public int LineID { get; set; }

        /// <summary>
        /// 生产线代号
        /// </summary>
        [Column("line_code")]
        public string LineCode { get; set; }

        /// <summary>
        /// 生产线名称
        /// </summary>
        [Column("line_name")]
        public string LineName { get; set; }

        /// <summary>
        /// 报表发放日期
        /// </summary>
        [Column("fill_date")]
        public DateTime FillDate { get; set; }


        /// <summary>
        /// 排产日期
        /// </summary>
        [Column("prod_date")]
        public DateTime? ProdDate { get; set; }

        /// <summary>
        /// 工单ID（target_prod_process表的ID）
        /// </summary>
        [Column("prod_id")]
        public int ProdID { get; set; }

        /// <summary>
        /// 工单号
        /// </summary>
        [Column("prod_number")]
        public string ProdNumber { get; set; }

        /// <summary>
        /// 是否已完成，1代表工单已经完成；其他值代表未完成
        /// </summary>
        [Column("is_comp")]
        public int IsComp { get; set; }

        /// <summary>
        /// 完成日期
        /// </summary>
        [Column("comp_date")]
        public DateTime? CompDate { get; set; }


        /// <summary>
        /// 排单计划备注
        /// </summary>
        [Column("remark")]
        public string Remark { get; set; }

        /// <summary>
        /// PMC备注
        /// </summary>
        [Column("remark_pmc")]
        public string RemarkPMC { get; set; }

        /// <summary>
        /// 业务备注
        /// </summary>
        [Column("remark_bus")]
        public string RemarkBus { get; set; }


        /// <summary>
        /// 是否撤销，1代表计划已经撤销，否则则为没有撤销
        /// </summary>
        [Column("is_del")]
        public int IsDel { get; set; }

        /// <summary>
        /// 建档人
        /// </summary>
        [Column("create_user")]
        public string CreateUser { get; set; }


        /// <summary>
        /// 建档日期
        /// </summary>
        [Column("create_date")]
        public DateTime? CreateDate { get; set; }
    }
}
